﻿<Window x:Class="DACU.Windows.AddTrackWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        Title="Add Track" WindowStartupLocation="CenterOwner" SizeToContent="WidthAndHeight" ContentRendered="Window_ContentRendered">
	<Window.Resources>
	</Window.Resources>
    <Grid>
		<Grid.ColumnDefinitions>
			<ColumnDefinition />
			<ColumnDefinition Width="Auto" />
		</Grid.ColumnDefinitions>
		<Grid.RowDefinitions>
			<RowDefinition x:Name="NameRow" x:FieldModifier="private" Height="0" />
			<RowDefinition x:Name="FileRow" x:FieldModifier="private" Height="0" />
			<RowDefinition x:Name="ListRow" x:FieldModifier="private" Height="0" />
			<RowDefinition Height="Auto"/>
		</Grid.RowDefinitions>
		<Grid Grid.ColumnSpan="2" Margin="5,5,5,2">
			<Grid.ColumnDefinitions>
				<ColumnDefinition Width="Auto" />
				<ColumnDefinition />
			</Grid.ColumnDefinitions>
			<TextBlock Text="Name:" Margin="0,0,5,0" />
			<TextBox Name="tbUrlTitle" x:FieldModifier="private" MinWidth="120" Grid.Column="2" GotFocus="tbPath_GotFocus" />
		</Grid>
		<TextBox Name="tbPath" x:FieldModifier="private" Margin="5,3,2,5" MinWidth="200" Grid.Row="1" GotFocus="tbPath_GotFocus"
				 ToolTipService.ShowOnDisabled="True"
				 ToolTip="{Binding RelativeSource={RelativeSource Self}, Path=Text}">
		</TextBox>
		<Button Name="bBrowse" x:FieldModifier="private" Content="Browse" Grid.Column="1" Margin="3,3,5,5" Click="bBrowse_Click" Grid.Row="1" />
		<Grid Grid.Row="2" Grid.ColumnSpan="2" Margin="5,0,5,5">
			<Grid.RowDefinitions>
				<RowDefinition Height="Auto" />
				<RowDefinition />
			</Grid.RowDefinitions>
			<CheckBox Name="cbSelectAll" x:FieldModifier="private" Content="Select All" Padding="0" Margin="0,0,0,3" Click="cbSelectAll_Click" IsThreeState="True"/>
			<DataGrid Name="dgVKAudios" x:FieldModifier="private" AutoGenerateColumns="False" Grid.Row="2" CanUserReorderColumns="False" AlternationCount="2" AlternatingRowBackground="AliceBlue" GridLinesVisibility="None" SelectionChanged="dgVKAudios_SelectionChanged" HeadersVisibility="Column">
				<DataGrid.Columns>
					<DataGridTextColumn Header="#" IsReadOnly="True" CanUserSort="False">
						<DataGridTextColumn.Binding>
							<MultiBinding Converter="{StaticResource ResourceKey=DataItemToIndex}">
								<Binding RelativeSource="{RelativeSource FindAncestor, AncestorType=DataGrid, AncestorLevel=1}" Path="Items"/>
								<Binding />
							</MultiBinding>
						</DataGridTextColumn.Binding>
					</DataGridTextColumn>
					<DataGridTextColumn Header="Artist" Binding="{Binding Artist}" IsReadOnly="True" />
					<DataGridTextColumn Header="Title" Binding="{Binding Title}" IsReadOnly="True" />
				</DataGrid.Columns>
			</DataGrid>
			<!--<ListView Name="lbVKAudios" x:FieldModifier="private" Grid.Row="2" SelectionChanged="lbVKAudios_SelectionChanged" Grid.IsSharedSizeScope="True" ItemContainerStyleSelector="{DynamicResource PlayListStyleSelector}">
				<ListView.ItemTemplate>
					<DataTemplate>
						<Grid>
							<Grid.ColumnDefinitions>
								<ColumnDefinition SharedSizeGroup="column1"/>
								<ColumnDefinition SharedSizeGroup="column2"/>
								<ColumnDefinition SharedSizeGroup="column3"/>
							</Grid.ColumnDefinitions>
							<TextBlock Margin="2,0,3,0">
								<TextBlock.Text>
									<MultiBinding Converter="{StaticResource ResourceKey=ItemToIndex}">
										<Binding RelativeSource="{RelativeSource FindAncestor, AncestorType=ListView, AncestorLevel=1}" Path="Items"/>
										<Binding RelativeSource="{RelativeSource FindAncestor, AncestorType=ListViewItem, AncestorLevel=1}"/>
									</MultiBinding>
								</TextBlock.Text>
							</TextBlock>
							<TextBlock Text="{Binding Artist}" Grid.Column="1" Margin="2,0,3,0" />
							<TextBlock Text="{Binding Title}" Grid.Column="2" Margin="2,0" />
						</Grid>
					</DataTemplate>
				</ListView.ItemTemplate>
			</ListView>-->
		</Grid>
		<Button Name="bOk" x:FieldModifier="private" Content="Ok" Grid.Row="3" Grid.ColumnSpan="2" Margin="5,0,5,5" Click="Ok_Click" />
	</Grid>
</Window>
